<?php
/**
 * Created by PhpStorm.
 * User: meng
 * Date: 2023/12/21
 * Time: 10:38
 */

namespace model;

use lib\common\CommonModel;
use think\model\concern\SoftDelete;

class SettingItemModel extends CommonModel
{
    use SoftDelete;

    protected $table = 'sys_setting_item';
    protected $deleteTime = 'delete_time';
    protected $autoWriteTimestamp = 'datetime';
    protected $createTime = 'create_time';
    protected $updateTime = false;
    protected $hidden = ['delete_time'];

    const ALLOWED_FIELDS = ['setting_id', 'name', 'key', 'type', 'options', 'rules', 'placeholder'];
    const ALLOWED_UPLOAD_FIELDS = ['name', 'key', 'type', 'options', 'rules', 'placeholder'];
}
